<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:sec="http://www.springframework.org/security/tags"
	xmlns:p="http://primefaces.org/ui">
<hgroup class="intro">
          <h1 class="title">RestFinder</h1>
          <h3 class="tagline">Pierwszy portal rekomendacyjny o restauracjach w Twoim mieście</h3>
        </hgroup>
        <div class="reservations"><br />
         <sec:authorize ifAnyGranted="ROLE_ANONYMOUS">   
	          <h:form id="Register">
	          		<p:messages id="msgs" closable="true" showDetail="true" />
		          			<h:outputText value="#{msg['login.login']}" />
							<p:inputText id="login" value="#{loginMB.login}" />
							<p:tooltip for="login" value="#{msg['login.login.description']}" />
							<p:message for="login" />
							
							<h:outputText value="#{msg['login.password']}" />
							<p:password id="password" value="#{loginMB.password}" />
							<p:tooltip for="password" value="#{msg['login.password.description']}" />
							<p:message for="password" />
							
				          	<p:splitButton update="msgs" value="#{msg['login.login.submit']}" action="#{loginMB.login}">  
									<p:menuitem value="#{msg['login.register.submit']}" action="#{loginMB.register}" ajax="true" icon="ui-icon-circle-arrow-w"/>
							</p:splitButton>  
				</h:form>
			</sec:authorize>
			<sec:authorize ifNotGranted="ROLE_ANONYMOUS">
			 <h:form id="Registewwqr">
			 <img src="/images/z.png" height="64" width="64" />
		        Witaj, cichy !
		        <p:splitButton value="#{msg['login.login.submit']}" action="#{loginMB.login}">  
								<p:menuitem value="#{msg['login.register.submit']}" action="#{loginMB.register}" ajax="true" icon="ui-icon-circle-arrow-w"/>
								<p:menuitem value="#{msg['login.register.submit']}" action="#{loginMB.register}" ajax="true" icon="ui-icon-circle-arrow-w"/>
								<p:menuitem value="#{msg['login.register.submit']}" action="#{loginMB.register}" ajax="true" icon="ui-icon-circle-arrow-w"/>
								<p:menuitem value="#{msg['login.register.submit']}" action="#{loginMB.register}" ajax="true" icon="ui-icon-circle-arrow-w"/>
								<p:menuitem value="#{msg['login.register.submit']}" action="#{loginMB.register}" ajax="true" icon="ui-icon-circle-arrow-w"/>
				</p:splitButton>
				</h:form> 
		    </sec:authorize>   
          </div>
		<p:spacer height="180" />
</html>